package hongcheng.code_generator.entity.db;


import java.util.List;

import cn.hutool.core.util.StrUtil;
/**
 * 	数据库表元数据
 * */
public class TableMetadata {

	/**
	 * 	表名
	 * */
	private String tableName;
	/**
	 * 	表注释
	 * */
	private String tableComment;
	/**
	 * 	表名驼峰写法（首字母小写）
	 * */
	private String tableNameHump;
	/**
	 * 	表名驼峰写法（首字母大写）
	 * */
	private String tableNameHumpUpFirst;
	/**
	 * 	表字段
	 * */
	List<TableColumnMetadata> tableColumnList;
	
	/**
	 * 	主键
	 * */
	private TableColumnMetadata primaryKey;
	

	
	
	



	public TableColumnMetadata getPrimaryKey() {
		return primaryKey;
	}



	public void setPrimaryKey(TableColumnMetadata primaryKey) {
		this.primaryKey = primaryKey;
	}



	public void setTableName(String tableName) {
		this.tableName = tableName;
		this.tableNameHump = StrUtil.toCamelCase(tableName);
		this.tableNameHumpUpFirst = StrUtil.upperFirst(tableNameHump);
	}



	public void setTableComment(String tableComment) {
		this.tableComment = tableComment;
	}



	public void setTableColumnList(List<TableColumnMetadata> tableColumnList) {
		this.tableColumnList = tableColumnList;
	}



	public String getTableName() {
		return tableName;
	}



	public String getTableComment() {
		return tableComment;
	}



	public String getTableNameHump() {
		return tableNameHump;
	}



	public String getTableNameHumpUpFirst() {
		return tableNameHumpUpFirst;
	}



	public List<TableColumnMetadata> getTableColumnList() {
		return tableColumnList;
	}



	@Override
	public String toString() {
		return "TableMetadata [tableName=" + tableName + ", tableComment=" + tableComment + ", tableNameHump="
				+ tableNameHump + ", tableNameHumpUpFirst=" + tableNameHumpUpFirst + ", tableColumnList="
				+ tableColumnList + "]";
	}
	
	
}
